import http from "@/router/http"

//配置登录接口
export const usersLoginAPI = (data: any) => {
  return http({
    url: "/users/login",
    method: "post",
    data
  })
}

//配置用户注册接口
export const AddusersAPI = (data: any) => {
  return http({
    url: "/users/addUser",
    method: "post",
    data
  })
}

//配置检查账号是否存在接口
export const detectionUsers = (params: any) => {
  return http({
    url: "/users/checkAccount",
    method: "get",
    params
  })
}

//配置修改密码接口
export const changePSW = (data: any) => {
  return http({
    url: "/users/changePwd",
    method: "post",
    data
  })
}

//配置获取管理员列表接口
export const getUserList = (params: any) => {
  return http({
    url: "/users/getUserList",
    method: "get",
    params
  })
}

//配置删除管理员列表接口
export const delateUsersAPI = (id: string) => {
  return http({
    url: "/users/deleteUser?id=" + id,
    method: "get",
  })
}

//配置修改管理员列表接口
export const editAPI = (data:any) => {
  return http({
    url: "/users/updateUser",
    method: "post",
    data
  })
}